package mp;

import com.ms.education.acl.AclApplication;
import com.ms.education.acl.entity.Permission;
import com.ms.education.acl.service.PermissionService;
import com.ms.education.acl.service.RoleService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Map;

/**
 * <p>Project:education-test
 * <p>Powered by ms on 2023-02-27 06:13:41
 *
 * @author ms
 * @version 1.0
 * @since 1.8
 */
@SpringBootTest(classes = AclApplication.class)
public class test {

    @Autowired
    private RoleService roleService;

    @Autowired
    private PermissionService permissionService;

    @Test
    public void test01(){
        Map<String, Object> ma = roleService.getRoleAndPermission(701);
        System.out.println(ma);
    }

    @Test
    public void test02(){
        System.out.println("============"+permissionService.getMenu(701));
    }

    @org.junit.Test
    public  void test03(){
        Permission p1 = new Permission();
        p1.setName("1");

        Permission p2 = new Permission();
        p2.setName("1");

        System.out.println(p1.equals(p2));
    }
}
